

const state = {
    theme:'light',//主题色
    desc:'测试demo'
}
const actions = {
    Change(context,newUserInfo){
        //将异步在action 中封装
        setTimeout(()=>{
            context.commit('upColor',newUserInfo)
        },1000)
    }
}
const mutations = {
    upColor(state,newColor){
      state.theme=newColor
    }
}
const getters = {}
export default {
    namespaced:true,
    state,
    mutations,
    actions,
    getters
}